#include<stdio.h>
main()
{
	int a,b,c,d;
	scanf("%d",&a);
	b=a/100;
	c=a%100;
	d=(b-8)*100;
	
	if ( d>=0 ) {
        printf("%d", d+c);
    } else {
        printf("%d",d+c+2400);
    }
	
	return 0;
	}
